package com.serviceimpl;

import com.dao.UserDao;
import com.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

@Service("userService")
public class UserServiceImpl implements UserService {
    @Autowired
    @Qualifier("userDaoImpl")
    //先通过类型匹配进行注入 如果没有相应的spring管理对象的类型 通过名称进行赋值
    UserDao userDao;

    public void login() {
        System.out.println("userService执行，登录服务");
        userDao.selectByUsernameAndPassword();
    }
}
